Improve privacy command formatting - #66
Closed
belofe wants to merge 4 commits into
Closed
Conversation
Contributor
Reviewer's GuideIntroduces a new Discord "privacy" slash command cog that presents the bot’s privacy policy and data handling information using a structured embed, and registers it with the bot via an async setup function. Sequence diagram for the new privacy slash command flowsequenceDiagram
actor User
participant DiscordClient
participant DiscordAPI
participant Bot
participant PrivacyCog
User->>DiscordClient: Trigger /privacy command
DiscordClient->>DiscordAPI: Send interaction
DiscordAPI->>Bot: POST interaction
Bot->>PrivacyCog: Call privacy(interaction)
PrivacyCog->>PrivacyCog: Build privacy policy embed
PrivacyCog->>Bot: interaction.response.send_message(embed, ephemeral=True)
Bot->>DiscordAPI: Send response payload
DiscordAPI->>DiscordClient: Deliver ephemeral embed message
DiscordClient->>User: Display privacy policy embed
Class diagram for the new Privacy cogclassDiagram
class Bot {
}
class Privacy {
- bot Bot
- log Logger
+ Privacy(bot Bot)
+ privacy(interaction Interaction) void
}
class Logger {
}
class Interaction {
}
class SetupModule {
+ setup(bot Bot) void
}
Bot <|.. Privacy : uses
Privacy o-- Logger : has
Privacy ..> Interaction : uses
SetupModule ..> Bot : parameter
SetupModule ..> Privacy : adds cog
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The embed field with
name='\n'and another withname='Your information is never shared or used for marketing purposes.\n'are a bit awkward; consider using more descriptive field titles and moving full-sentence statements into thevalueto improve readability and localization later. - Logging
"Privacy cog initialized"at INFO level in__init__may be noisy if many cogs behave similarly; consider using DEBUG or centralizing cog-load logging at the bot level instead.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The embed field with `name='\n'` and another with `name='Your information is never shared or used for marketing purposes.\n'` are a bit awkward; consider using more descriptive field titles and moving full-sentence statements into the `value` to improve readability and localization later.
- Logging `"Privacy cog initialized"` at INFO level in `__init__` may be noisy if many cogs behave similarly; consider using DEBUG or centralizing cog-load logging at the bot level instead.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improved the formatting of the privacy command
Summary by Sourcery
Add a dedicated privacy policy cog providing a formatted slash command for viewing data handling information.
New Features:
Enhancements: